catch (Exception ex)
{
if (ex is FormatException || ex is OverflowException)
{
WebId = Guid.Empty;
return;
}
throw;
}
catch (Exception ex)
{
if (ex is FormatException || ex is OverflowException)
{
WebId = Guid.Empty;
return;
}
throw;
}
catch (Exception ex)
{
if (ex is FormatException or OverflowException) // Chain as many or xException as you need
{
WebId = Guid.Empty;
return;
}
throw;
}